<template>
  <div class="header">
    <el-header>
      <div class="title">通用管理系统</div>
      <div class="name">{{ name }}</div>
    </el-header>
  </div>
</template>

<script>
import { getToken } from "@/utils/setToken";
export default {
  name: "Header",
  data() {
    return {
      name: getToken("username") || "",
    };
  },
};
</script>

<style lang="less" scoped>
.header {
  .el-header {
    line-height: 60px;
    background-color: #2578b5;
    color: #fff;
    display: flex;
    justify-content: space-between;
    .title {
      width: 200px;
      font-size: 24px;
    }
  }
}
</style>